package com.example.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.controller.utils.R;
import com.example.domain.Book;
import com.example.service.BookService;
import com.example.service.MsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/msg")
public class MsgController {

    @Autowired
    private MsgService msgService;

    @PostMapping()
    public Boolean check(String tele,String code) throws Exception {
        return  msgService.check(tele,code) ;
    }
    @GetMapping("{tele}")
    public String getById(String tele ){
        return  msgService.get(tele);
    }

}
